* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

/* 白色模糊工具栏样式 */
.toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.toolbar-btn:hover {
    background: white;
    transform: scale(1.1);
    color: #4facfe;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

/* 刷新动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toolbar-btn.refreshing i {
    animation: spin 1s linear infinite;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.update-time {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    padding: 30px;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-left: 4px solid #4facfe;
    padding-left: 15px;
}

/* 响应式设计 - 工具栏 */
@media (max-width: 768px) {
    .toolbar {
        top: 15px;
        right: 15px;
        padding: 6px;
    }
    
    .toolbar-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .toolbar {
        top: 10px;
        right: 10px;
    }
    
    .toolbar-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* 天气实况样式 */
.current-weather {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.temperature {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
}

.weather-desc {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.weather-icon {
    font-size: 3rem;
}

.weather-detail {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 1.1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 天气预报样式 */
.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.forecast-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.forecast-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.forecast-item .date {
    font-weight: bold;
    margin-bottom: 15px;
    color: #4facfe;
    font-size: 1.2rem;
}

.day-weather, .night-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.temp-range {
    margin-top: 15px;
    font-weight: bold;
    color: #e74c3c;
}

/* 生活指数样式 */
.indices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.index-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.index-item:hover {
    transform: scale(1.02);
}

.index-icon {
    font-size: 2.5rem;
    color: #4facfe;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.index-info h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.index-info p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .current-weather {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .temperature {
        font-size: 4rem;
    }
    
    .weather-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-detail {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    
    .forecast-container, .indices-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .temperature {
        font-size: 3.5rem;
    }
    
    .weather-detail {
        flex-direction: column;
        gap: 10px;
    }
    
    main {
        padding: 20px;
    }
}